package com.zack.designPattern.factory.simpleFactory;

public class PhoneFactory implements IFactory {

	@Override
	public IProduct createProduct(String name) {
		//FIXME of course, we can use reflection to create product;
		if("nokia".equals(name)){
			return new NokiaPhone();
		}else if("moto".equals(name)){
			return new MotoPhone();
		}else{
			return null;
		}
	}

}
